; RUN: llvm-undname < %s | FileCheck %s
; RUN: llvm-undname --no-calling-convention < %s | FileCheck %s --check-prefix=CHECK-NO-CALLING-CONV
; RUN: llvm-undname --no-return-type < %s | FileCheck %s --check-prefix=CHECK-NO-RETURN
; RUN: llvm-undname --no-access-specifier < %s | FileCheck %s --check-prefix=CHECK-NO-ACCESS
; RUN: llvm-undname --no-member-type < %s | FileCheck %s --check-prefix=CHECK-NO-MEMBER-TYPE
; RUN: llvm-undname --no-variable-type < %s | FileCheck %s --check-prefix=CHECK-NO-VARIABLE-TYPE
; RUN: llvm-undname --no-calling-convention --no-return-type --no-access-specifier --no-member-type --no-variable-type < %s | FileCheck %s --check-prefix=CHECK-NO-ALL

?func@MyClass@@UEAAHHH@Z
; CHECK: public: virtual int __cdecl MyClass::func(int, int)
; CHECK-NO-CALLING-CONV: public: virtual int MyClass::func(int, int)
; CHECK-NO-RETURN: public: virtual __cdecl MyClass::func(int, int)
; CHECK-NO-ACCESS: {{^}}virtual int __cdecl MyClass::func(int, int)
; CHECK-NO-MEMBER-TYPE: public: int __cdecl MyClass::func(int, int)
; CHECK-NO-VARIABLE-TYPE: public: virtual int __cdecl MyClass::func(int, int)
; CHECK-NO-ALL: {{^}}MyClass::func(int, int)

?array2d@@3PAY09HA
; CHECK: int (*array2d)[10]
; CHECK-NO-CALLING-CONV: int (*array2d)[10]
; CHECK-NO-RETURN: int (*array2d)[10]
; CHECK-NO-ACCESS: int (*array2d)[10]
; CHECK-NO-MEMBER-TYPE: int (*array2d)[10]
; CHECK-NO-VARIABLE-TYPE: array2d
; CHECK-NO-ALL: array2d

?a@abc@@3PAY09HA
; CHECK: int (*abc::a)[10]
; CHECK-NO-CALLING-CONV: int (*abc::a)[10]
; CHECK-NO-RETURN: int (*abc::a)[10]
; CHECK-NO-ACCESS: int (*abc::a)[10]
; CHECK-NO-MEMBER-TYPE: int (*abc::a)[10]
; CHECK-NO-VARIABLE-TYPE: abc::a
; CHECK-NO-ALL: abc::a

?x@@3PEAEEA
; CHECK: unsigned char *x
; CHECK-NO-CALLING-CONV: unsigned char *x
; CHECK-NO-RETURN: unsigned char *x
; CHECK-NO-ACCESS: unsigned char *x
; CHECK-NO-MEMBER-TYPE: unsigned char *x
; CHECK-NO-VARIABLE-TYPE: x
; CHECK-NO-ALL: x
